<!DOCTYPE html>
<iframe
    name="test"
    srcdoc="<script>window.addEventListener('unload', () => { window['test']; })</script>"
></iframe>
<script>
    window.addEventListener("unload", () => {
        window["test"];
    });
</script>
